<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">

<h:head></h:head>
<body>
	<ui:composition template="templates/mainTemplate.xhtml">
		<ui:define name="content">
			<h:form id="myForm">
				<p:fieldset legend="#{messages['commands.userCommands']}" rendered="#{cCommandAction.isItemUser()}">
					<h:dataTable value="#{cCommandForm.userCommandList}" var="userCommand">
						<h:column>
							<h:commandLink action="#{userCommand.execute()}"
								value="#{messages[cCommandAction.getBundleNameFromGivenClass(userCommand)]}" />
						</h:column>
					</h:dataTable>
				</p:fieldset>
				<p:fieldset legend="#{messages['commands.tableCommands']}" rendered="#{cCommandAction.isItemTable()}">
					<h:dataTable value="#{cCommandForm.tableCommandList}" var="tableCommand">
						<h:column>
							<h:commandLink action="#{tableCommand.execute()}"
								value="#{messages[cCommandAction.getBundleNameFromGivenClass(tableCommand)]}" />
						</h:column>
					</h:dataTable>
				</p:fieldset>
				<p:fieldset legend="#{messages['commands.foodCommands']}" rendered="#{cCommandAction.isItemFood()}">
					<h:dataTable value="#{cCommandForm.foodCommandList}" var="foodCommand">
						<h:column>
							<h:commandLink action="#{foodCommand.execute()}"
								value="#{messages[cCommandAction.getBundleNameFromGivenClass(foodCommand)]}" />
						</h:column>
					</h:dataTable>
				</p:fieldset>
			</h:form>
		</ui:define>
	</ui:composition>
</body>
</html>